<?php $this->render("header.php");?>

<div class="list_box">
   <div class="list_bor">
    <div class="site_nav w_980">
        你现在的位置：<a href="<?php echo $this->baseUrl;?>/" title="首页">首页</a> &gt;        
        <?php if (!empty($this->type) && !empty($this->onetypename)) print <<<EOT
         <a href="{$this->onetypeurl}" title="{$this->onetypename}">{$this->onetypename}</a> &gt;
EOT;
?>
<a href="<?php echo $this->url($this->baseUrl,"", "list", "type=" . $this->type);?>" title="<?php echo $this->typename;?>"><?php echo $this->typename;?></a> &gt;
<span class="c_ora_red"><?php echo $this->content['name'];?></span>
    </div>
	<div class="w_986">
        <div class="list_sider f_l">
        	<h2 class="h2_title list_plate_bg f_family f_normal"><span class="more"></span><?php if (!empty($this->onetypename)) echo $this->onetypename; else echo $this->typename;?></h2>
            <div class="content list_plate_bg">
            	<ul class="list_sid_nav">
            	
            	<?php 
            	if (is_array($this->types))
            	foreach($this->types as $v){
            	$name = $v['name'];
            	$v_url = $this->url($this->baseUrl, "", "list", "type=" . $v['id']);
            	if ($this->type==$v['id'])
            		$selected = ' class="selected" ';
            	else
            		$selected = "";
            	print <<<EOT
                	<li><a $selected href="$v_url" title="$name"><i class="icon_a icon_all"></i>$name</a></li>
EOT;
}?>
                </ul>
            	<div class="clear"></div>
            </div>
            <div class="list_sider_bot list_plate_bg"></div>
        </div>
        <div class="list_main f_r">
        	<div class="list_plate_bg main_top"></div>
            <div class="content list_plate_bg">
            	<div class="list_content">
                    <h1 class="h1_detail_title f_family f_normal"><?php echo $this->content['name'];?></h1>
                    <h2 class="h2_detail_title f_family f_normal"></h2>
                    <div class="detail_title_info">作者：<?php echo $this->content['author'];?></div>
                    <div class="detail_text_content">
                    	<?php if (!empty($this->content['image2'])){print <<<EOT
                    	<p class="img_p"><img src="{$this->baseUrl}{$this->content['image2']}" width="680"/></p>
EOT;
}elseif (!empty($this->content['vid'])){
?>
<p align="center">
<?php
if (!empty($this->content['url']))
	$url = urlencode($this->content['url']);
else
	$url = urlencode($this->fullUrl.'/upload/flv/' . $this->content['path']);

$extName =strtolower(pathinfo($url, PATHINFO_EXTENSION));

$isFlv = ($extName == 'flv') ? true:false;
if (!$isFlv){
	$url = urldecode($url);
}

$isIpad = false;

if (stripos($_SERVER['HTTP_USER_AGENT'], "ipad") !== false || stripos($_SERVER['HTTP_USER_AGENT'], "iphone") !== false){
	$isIpad = true;
	$extName = pathinfo($url, PATHINFO_EXTENSION);
	$url = urldecode($url);
	$url = str_replace("." . $extName, ".mp4", $url);
}
?>
<?php
if ($isIpad){
?>
<video id="html5video" controls="controls" preload autoplay>
<source src="<?php echo $url;?>" type="video/mp4"/>
</video>
<?php
}elseif($isFlv){
?>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="400" height="320">
<param name="movie" value="<?php echo $this->baseUrl;?>/images/flvplayer.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="allowFullScreen" value="true" />
<param name="FlashVars" value="file=<?php echo $url;?>&title=<?php echo urlencode($this->content['name']);?>)">

<embed src="<?php echo $this->baseUrl;?>/images/flvplayer.swf"
allowFullScreen="true" FlashVars="file=<?php echo $url;?>&title=<?php echo urlencode($this->content['name']);?>)"
menu="false" quality="high" 
width="400" height="320" 
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

</object>
<?php
}else{
?>
<OBJECT id=WindowsMediaPlayer1 height=320 width=400 classid=clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6>
<PARAM NAME="URL" VALUE="<?php echo $url;?>">
<PARAM NAME="rate" VALUE="1">
<PARAM NAME="balance" VALUE="0">
<PARAM NAME="currentPosition" VALUE="0">
<PARAM NAME="defaultFrame" VALUE="">
<PARAM NAME="playCount" VALUE="1">
<PARAM NAME="autoStart" VALUE="-1">
<PARAM NAME="currentMarker" VALUE="0">
<PARAM NAME="invokeURLs" VALUE="-1">
<PARAM NAME="baseURL" VALUE="">
<PARAM NAME="volume" VALUE="50">
<PARAM NAME="mute" VALUE="0">
<PARAM NAME="uiMode" VALUE="full">
<PARAM NAME="stretchToFit" VALUE="0">
<PARAM NAME="windowlessVideo" VALUE="0">
<PARAM NAME="enabled" VALUE="-1">
<PARAM NAME="enableContextMenu" VALUE="-1">
<PARAM NAME="fullScreen" VALUE="0">
<PARAM NAME="SAMIStyle" VALUE="">
<PARAM NAME="SAMILang" VALUE="">
<PARAM NAME="SAMIFilename" VALUE="">
<PARAM NAME="captioningID" VALUE="">
<PARAM NAME="enableErrorDialogs" VALUE="0">
<PARAM NAME="_cx" VALUE="8467">
<PARAM NAME="_cy" VALUE="7938"></OBJECT>
<?php
}
?>
</p>
<?php
}
	echo $this->content['content'];
?>
                        
<?php if (!empty($this->content['pdf']) && $this->content['btnpdf'] == 1){ print <<<EOT
                    	<p><div class="txt_c pdf_down_box"><a class="pdf_down_btn" href="{$this->baseUrl}{$this->content['pdf']}" title="PDF下载"></a></div></p>
EOT;
}?> 
                    </div>
                </div>
<?php if (!empty($this->pageprenext)) echo $this->pageprenext;?>
<?php if (!empty($this->relations)) echo $this->relations;?>              
            	<div class="clear"></div>
            </div>
            <div class="list_plate_bg main_bot"></div>
        </div>
        <div class="clear"></div>
    </div>
  </div>

</div>

<?php $this->render("footer.php");?>
</body>
</html>